﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Hired
{
    public partial class recoveraccount : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                lblError.Text = "No account exists for that e-mail address.";
            }
        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            object account = DBAccount.RetrieveAccountByEmail(txtEmail.Text);
            if (account != null)
            {
                Session["account"] = account;
                Server.Transfer("recoveraccount2.aspx");
            }
        }
    }
}